package pharao.server.services;

import net.sf.hibernate4gwt.core.HibernateBeanManager;
import net.sf.hibernate4gwt.core.beanlib.mapper.DirectoryClassMapper;
import server.rpc.HibernateRemoteAbstract;
import util.HibernateUtil;

public class HibernateRemoteImpl extends HibernateRemoteAbstract {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7738258184050534008L;
	
	static {
		HibernateBeanManager.getInstance().setSessionFactory(
				HibernateUtil.getSessionFactory());
		final DirectoryClassMapper classMapper = new DirectoryClassMapper();
		classMapper.setRootDomainPackage("pharao.domain");
		classMapper.setRootClonePackage("pharao.client.dto");
		classMapper.setCloneSuffix("DTO");
		HibernateBeanManager.getInstance().setClassMapper(classMapper);
	}

}
